package cn.xinfei.xdecision.common.dao.datax.datamanage.v2;

import cn.xinfei.xdecision.common.model.datax.datamanage.request.VariableBatchDeleteParam;
import cn.xinfei.xdecision.common.model.datax.datamanage.request.VariableDeleteParam;
import cn.xinfei.xdecision.common.model.datax.datamanage.v2.VariableParam;
import cn.xinfei.xdecision.common.model.datax.datamanage.v2.vo.VariableParamVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

@Mapper
public interface VariableParamMapper extends BaseMapper<VariableParam> {


    List<String> getVarParamCodesDistinct(@Param("varCodes") Set<String> varCodes);

    @MapKey("varCode")
    Map<String, Map<String, String>> getVarCodeAndParams(@Param("varCodes") Set<String> varCodes);

    Set<String> getVarParamCode(@Param("varCode") String varCode);

    int addVariableParams(@Param("variableParams") Collection<VariableParamVO> variableParams);

    void deleteVariableParam(@Param("varCode") String varCode, @Param("organId") Long organId);

    void logicalDeleteVarParam(VariableDeleteParam variable);

    void batchLogicalDeleteVarParam(VariableBatchDeleteParam batchDeleteParam);
}
